<%@page import="org.springframework.context.annotation.Import"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>>
<%@taglib uri="http://shiro.apache.org/tags" prefix="shiro"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style>
iframe {
	height: 900px;
}
</style>
</head>
<link
	href="${pageContext.request.contextPath}/javascript/bootstrap/css/bootstrap.min.css"
	rel="stylesheet">
<body>

	<div class="container-fluid">
		<div class="row">
			<div class="navbar navbar-inverse" style="margin-bottom: 5px;">
				<div class="col-xs-12">
					<center>
						<h3 style="color: white;">电商管理系统</h3>
					</center>
					<h3 style="color: white;">

						欢迎
						<shiro:principal></shiro:principal>
						来到电商系统!
					</h3>
					<span style="color: white;">当前登录用户数:${loginNum}</span>
				</div>
				<a class="btn btn-primary" href="loginOut.action"
					style="color: white; margin-left: 95%;">退出登录</a>
			</div>
		</div>
		<div class="row">
			<div class="col-xs-2">
				<div class="panel-group" id="accordion" role="tablist"
					aria-multiselectable="false">
					<c:forEach items="${list}" var="p" varStatus="v">
						<shiro:hasPermission name="${p.pname}">
							<div class="panel panel-default">
								<div class="panel-heading" role="tab" id="heading${v.index}">
									<h4 class="panel-title">
										</a> <a class="collapsed" role="button" data-toggle="collapse"
											data-parent="#accordion" href="#collapse${v.index}"
											aria-expanded="false" aria-controls="collapse${v.index}">
											${p.pinfo }</a>
									</h4>
								</div>

						<!-- panel-collapse collapse 隐藏内容-->
						<!-- panel-collapse collapse in 显示内容-->
								<div id="collapse${v.index}" class="panel-collapse collapse "
									role="tabpanel" aria-labelledby="heading${v.index}">
									<div class="panel-body">

										<c:if test="${p.list!=null }">
											<c:forEach items="${p.list}" var="c">

												<shiro:hasPermission name="${c.pname }">
													<p>
														<a class="btn btn-block btn-primary" href="${c.purl }"
															target="showAll">${c.pinfo }</a>
													</p>
												</shiro:hasPermission>
											</c:forEach>
										</c:if>
									</div>
								</div>



							</div>
						</shiro:hasPermission>
					</c:forEach>
					<div class="panel panel-default">
						<div class="panel-heading" role="tab" id="headingFour">
							<h4 class="panel-title">
								<a class="collapsed" role="button" data-toggle="collapse"
									data-parent="#accordion" href="#collapseFour"
									aria-expanded="false" aria-controls="collapseFour"> 文件管理 </a>
							</h4>
						</div>
						<div id="collapseFour" class="panel-collapse collapse"
							role="tabpanel" aria-labelledby="headingFour">
							<div class="panel-body">
								<p>
									<a class="btn btn-block btn-primary" href="upLoad.action"
										target="showAll">上传下载</a>
								</p>
								<p>
									<a class="btn btn-block btn-primary" href="upLoad2.action"
										target="showAll">Springmvc上传下载</a>
								</p>
								<p>
									<a class="btn btn-block btn-primary" href="upshow.action"
										target="showAll">显示所有文件</a>
								</p>

							</div>
						</div>
					</div>


				</div>
			</div>

			<div class="col-xs-10">
				<iframe name="showAll" src="right.action" scrolling="auto"
					frameborder="0" width="100%"></iframe>
			</div>
		</div>



	</div>


</body>

<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script
	src="${pageContext.request.contextPath}/javascript/myjavascript/jQuery-1.12.4.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script
	src="${pageContext.request.contextPath}/javascript/bootstrap/js/bootstrap.min.js"></script>
</html>